package com.cjgl.mapper;

import com.cjgl.model.entity.TblAdmin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author zhangyuwu
* @description 针对表【tbl_admin(管理员表)】的数据库操作Mapper
* @createDate 2023-06-05 20:49:50
* @Entity com.cjgl.model.entity.TblAdmin
*/
public interface TblAdminMapper extends BaseMapper<TblAdmin> {

	@Select("select distinct studentMajor from tbl_students")
	public List<String> getMajorsAndClassNos();

	@Select("select distinct studentClassNo from tbl_students where studentMajor =#{studentMajor}")
	public List<String> getClassNos(String studentMajor);


	@Select("select distinct teacherDeptname from tbl_teacher")
	public  List<String> getDepts();
	@Select("select distinct classMajor from tbl_class")
	public  List<String> getClassMajor();

	@Select("update tbl_students set studentClassNo = null where studentClassNo=#{studentClassNo}")
	public  Integer updateStudent(String studentClassNo);
}




